<style>
#text {
    z-index: 10;
    background: orange;
    position: relative;
    opacity: 0.5;
    width: fit-content;
}
#box {
    z-index: 5;
    width: 50px;
    height: 50px;
    background: green;
    position: relative;
    top: -10px;
}
</style><div id="text">hello</div><div id="box"></div>
